﻿<div id="_PopupSelectResource" data-toggle="popup" data-type="SelectResource" data-title="选择资源" data-size="large">
    <div class="popup-content" data-toggle="form" data-field="Resource" data-detailable="true" data-filterable="true" data-grid="#_PopupSelectResource_Resource_grid">
        <div class="popup-body">
            <div class="form-content">
                <div class="form-body">
                    <div class="row">
                        <input data-field="name,alias,title,content" data-size="4,0,12" data-logic="or" data-operator="contains" />
                        <button data-button="query">查询</button>
                        <button data-button="clear">清除条件</button>
                    </div>
                    <div data-toggle="grid" node="grid" data-related="#_PopupSelectResource">
                        <div node="columns" node-type="array">
                            <span data-field="_parent.name" data-title="父级资源"></span>
                            <span data-field="name" data-title="资源名称" data-width="30%"></span>
                            <span data-field="alias" data-title="资源别名" data-hidden="true"></span>
                            <span data-field="title" data-title="资源显示名称"></span>
                            <span data-field="type" data-title="授权类型" data-template="#:data=>$.com.commonFormatter(cache.authorizeType, data.type)"></span>
                            <span data-field="resourceType" data-title="资源类型" data-template="#:data=>$.com.commonFormatter(cache.resourceType, data.resourceType)"></span>
                            <span data-field="identityType" data-title="资源所有者类型" data-hidden="true" data-template="#:data=>$.com.commonFormatter(cache.identityType, data.identityType)"></span>
                            <span data-field="content" data-title="资源内容"></span>
                            <span data-field="description" data-title="备注说明" data-hidden="true"></span>
                            <span data-field="createdOn" data-title="创建时间" data-type="datetime"></span>
                        </div>
                        <span node="dataSource" data-auto-query="false">
                            <span node="transport">
                                <span node="read" data-url="/odata/Resources?$select=id,name,alias,title,type,resourceType,identityType,content,description,createdOn&$expand=parent($select=id,name)">
                                </span>
                            </span>
                            <span node="sort" data-field="name" data-dir="asc"></span>
                        </span>
                    </div>
                </div>
            </div>
        </div>
        <div class="popup-footer text-right">
            <button data-button="ok"></button>
            <button data-button="close"></button>
        </div>
    </div>
</div>